import request from "@/utils/request";
import type {SysUserType} from "@/types/system";

const baseUrl = '/system/post';

export function getPostList() {
    return request({
        url: `${baseUrl}/list`,
        method: 'GET',
    });
}
export function add(data: SysUserType) {
    return request({
        url: `${baseUrl}`,
        method: 'POST',
        data,
    });
}

export function update(data: SysUserType) {
    return request({
        url: `${baseUrl}`,
        method: 'PUT',
        data,
    });
}

export function deleteById(id: string) {
    return request({
        url: `${baseUrl}/${id}`,
        method: 'DELETE',
    });
}

export function getPostSelect() {
    return request({
        url: `${baseUrl}/optionselect`,
        method: 'GET',
    });
}
